2 Problem: 10473 - Simple Base Conversion
3 Author: Andrés Mejía-Posada
4 (http://blogaritmo.factorcomun.org)
28 #define D(x) cout << #x " is " << x << endl
34 while (scanf("%31s", buf
) == 1 && (n
= strlen(buf
)) > 0 && buf
[0] != '-'){
36 if (n
> 2 && buf
[1] == 'x'){
37 sscanf(buf
, "%x", &x
);
40 sscanf(buf
, "%d", &x
);